/////////////////////////////////////////////////
repo:    comment_subject
target:  comment_subject
branch:  7.x-2.x
tags:    7.x-2.x-dev
node:    4cc356d83def955c2e9015dfc7afa72aec9ed8e1
changes:
* PostgreSQL [#761276]: aggregate functions demand GROUP BY (SQL standard compliant)
/////////////////////////////////////////////////
=================================================
message: PostgreSQL [#761276]: aggregate functions demand GROUP BY (SQL standard compliant)
branch:  7.x-2.x
tags:    tip
node:    b9f137ca3267a917fd1647402e893dbde71254ce
=================================================
diff -r 4cc356d83def -r b9f137ca3267 comment_subject/comment_subject.tokens.inc
--- comment_subject.tokens.inc	Mon Feb 08 05:01:54 2010 -0500
+++ comment_subject.tokens.inc	Sun Apr 04 12:31:24 2010 -0500
@@ -87,7 +87,7 @@ function _comment_subject_get_numbering(
   // any token fetching this had to the comment loaded, and therefore catched already
   $comment = comment_load($cid);
   if (!isset($comments_count_cache[$comment->cid])) {
-    $query = 'SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND cid < :cid ORDER BY cid ASC';
+    $query = 'SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND cid < :cid GROUP BY nid';
     $comments_count_cache[$comment->cid] = db_query($query, array(
       ':nid' => $comment->nid, 
       ':cid' => $comment->cid,
/////////////////////////////////////////////////
generated with: drudiff comment_subject comment_subject 7.x-2.x-dev 7.x-2.x 
/////////////////////////////////////////////////
